import koaRouter from "koa-router";
const router = new koaRouter();
import * as Controller from "../controller/index";
// 接口测试
router.get("/api/test", Controller.getData);
// 获取报销相关统计数据
router.get("/api/count/expenseStatistics", Controller.getExpenseStatistics);
// 获取今年每日状态
router.get("/api/count/yearTravelStatus", Controller.getDayStatus);
// 按城市统计天数
router.get("/api/count/cityTravelDays", Controller.getCityTravelDays);
// 年出差树统计 1.1-12.31
router.get("/api/count/daysNumOfYear", Controller.getDaysNumOfYear);
// 最近一年收入支出占比
router.get("/api/count/detailsOfYear", Controller.getDetailsOfYear);
// 获取近一年每月出差天数
router.get("/api/count/monthTraveDays", Controller.getDayCount);
// 获取近一年报销数据
router.get("/api/count/lastYear", Controller.getLastYearData);
// 查询地区类型
router.get("/api/regionType/list", Controller.regionType);
// 状态列表
router.get("/api/status/list", Controller.getStatus);
// 录入报销信息
router.post("/api/receipt/insert", Controller.insertReceipt);
// 查询报销信息列表
router.get("/api/receipt/list", Controller.receiptList);
// 删除单条报销信息
router.delete("/api/receipt/del", Controller.deleteReceipt);
// 修改单条
router.put("/api/receipt/update", Controller.updateReceipt);
// 修改状态
router.put("/api/receiptStatus/update", Controller.updateReceiptStatus);
router.get("/", async (ctx) => {
  ctx.body = "系统开发中...";
});

export default router;
